/**
 * Majiang is a library that implements Mahjong game rules.
 *
 * Copyright 2009 Prudent Jérome
 *
 *     This file is part of Majiang.
 *
 *     Majiang is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     Majiang is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * You can contact me at jprudent@gmail.com
 */
package org.liprudent.majiang.engine.tile;

import java.io.Serializable;

/**
 * The most abstract tile ever
 * 
 */
public interface ITile extends Comparable<ITile>, Serializable{
	/**
	 * @return The kind of family the tile belongs to.
	 */
	public TileFamily getFamily();

	/**
	 * There are 4 copies of each tile
	 * 
	 * @return an integer between 0 and 3
	 */
	public int getId();

	/**
	 * 
	 * @param obj
	 *            The tile we want to compare to
	 * @return True if all attributes of obj, except id, are equals to this.
	 */
	public boolean compare(ITile obj);

	/**
	 * @return a value that is different for all tiles but equals for cloned tiles
	 */
	public int getCloneValue();
	
	/**
	 * @return A unique id among all the tiles in a game
	 */
	public String getUniqueId();
}
